'use strict'

module.exports = appInfo => {
  const config = (exports = {})

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '891027'

  // add your config here
  config.middleware = []

  config.security = {
    csrf: false,
    domainWhiteList: ['http://localhost:8080']
  }
  config.mongoose = {
    client: {
      url: 'mongodb://127.0.0.1/admin',
      options: {
        useNewUrlParser: true
      }
    }
  }
  config.cors = {
    origin: '*',
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
    credentials: true
  }

  return config
}
